<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>symbol</title>
</head>
<body>
  <script>
    //创建symbol
    let s = Symbol();
    // console.log(s,typeof s);

    let s2 = Symbol('尚硅谷');
    let s3 = Symbol('尚硅谷');
    //Symbol.for  创建
    let s4 = Symbol.for('尚硅谷');
    let s5 = Symbol.for('尚硅谷');

    console.log(s4===s5); // true
    // console.log(s2 === s3); //false

    //不能与其他数据进行运算,例如：
    // let result = s + 100;
    // let result = s > 100;
    // let result = s + s;

    //数据类型（七种）：USONB you are so niubility
    // u   undefined
    // s   string  Symbol
    // o   Object
    // n   null  Number
    // b   boolean
  </script>
</body>
</html>